package com.iflytek.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.iflytek.common.Result;
import com.iflytek.dto.PageDTO;
import com.iflytek.dto.UserDTO;
import com.iflytek.model.User;
import com.iflytek.vo.PageVO;
import com.iflytek.vo.UserVO;

import javax.servlet.http.HttpServletRequest;
import java.math.BigDecimal;
import java.util.List;

/**
 * <p>
 * 用户表 服务类
 * </p>
 *
 * @author h_t
 * @since 2023-09-23
 */
public interface UserService extends IService<User>   {

    User getUserByToken(HttpServletRequest request);

    Result<Boolean> saveUser(UserDTO userDTO);

    Result<Boolean> updateUser(UserDTO userDTO);

    Result<Boolean> deleteUser(Long id);

    Result<UserVO> login(UserDTO userDTO, HttpServletRequest request);

    Result<List<UserVO>> findAll();

    Result<UserVO> findById(Long id);

    Result<Boolean> reset(UserDTO userDTO);

    Result<Boolean> recharge(BigDecimal money, HttpServletRequest request);

    Result<Boolean> register(UserDTO userDTO);

    Result<PageVO<UserVO>> userListPage(PageDTO<UserDTO> pageDTO);

//    List<Permission> getPermissions(Long userId);
}